<ul class="nav nav-tabs">
	<li ng-class="{'active':pagedata.op=='image'}"><a href="javascript:;" ng-click="access('image')">图片附件管理</a></li>
	<li ng-class="{'active':pagedata.op=='audio'}"><a href="javascript:;" ng-click="access('audio')">音频附件管理</a></li>
	<li ng-class="{'active':pagedata.op=='video'}"><a href="javascript:;" ng-click="access('video')">视频附件管理</a></li>
	<li ng-class="{'active':pagedata.op=='add'}"><a href="javascript:;" ng-click="access('add')">批量上传附件</a></li>
	<li ng-class="{'active':pagedata.op=='add'}"><a href="javascript:;" ng-click="post_json({'op':'clear','message':'系统将会清除已被删除的附件的数据库记录！确认清理吗？'})">清理附件</a></li>
</ul>
<div ng-if="pagedata.op=='image'">

<div class="clearfix jinyun-margin-bottom">
	<div class="form-inline  pull-left">
			<div class="input-group form-group" style="width: 400px;">
				<input type="text" name="keyword" ng-model="pagedata.params.title" class="form-control" placeholder="搜索关键字"/>
				<span class="input-group-btn"><button id="submit" ng-click="pagedata.params.page=1;access(pagedata.op,made_query(pagedata.params))" class="btn btn-default"><i class="fa fa-search"></i></button></span>
			</div>
	</div>
</div>
<div class="img_pick_panel">
  <div class="inner_container_box side_r cell_layout">
    <div class="inner_main">
      <div class="bd">
        <div class="media_list">
          <div class="global_mod float_layout">
            <p class="global_info">
              <span class="group_name global_info_ele" id="js_currentgroup">当前分类图片总数：{{pagedata.total}}</span></p>
            
          </div>
          <div class="oper_group group">
            <div class="frm_controls oper_ele l">
              <label class="frm_checkbox_label" for="js_all">
                <input id="js_all" type="checkbox" style="margin-top:-4px;" data-label=" 全选" onclick="var ck = this.checked;$(':checkbox').each(function(){if(this.checked != ck){$(this).click();}});">
                <span class="lbl_content" >&nbsp;全选</span></label>
            </div>
            <a id="js_batchmove" class="btn btn-default oper_ele l js_popover" ng-click="getmodal('account.fujian','cgroup','ids='+pagedata.del)" href="javascript:;">移动分组</a>
            <a href="javascript:;"  class="btn btn-default oper_ele l js_popover" ng-click="post({},'del','del='+pagedata.del,'','确认删除这几张图片？')" >删除</a>
		  </div>
          <div class="group img_pick" id="js_imglist">
            <ul class="group">
              <li class="img_item js_imgitem" ng-repeat="item in pagedata.list">
                <div class="img_item_bd">
                  <span class="js_img_icon pic cover" style="background-image:url({{tomedia(item.attachment) || '../core/resource/images/nopic.jpg'}})"></span>
                  <span class="check_content">
                    <label class="frm_checkbox_label" for="checkbox1">
                      <input type="checkbox" style="margin-top:-24px;" ng-click="duoxuans(item.id,pagedata,'del')">
                      <span class="lbl_content">{{item.title}}</span></label>
                  </span>
                </div>
                <div class="msg_card_ft">
                  <ul class="grid_line msg_card_opr_list">
                    <li class="grid_item size-1of3 msg_card_opr_item">
                      <a href="javascript:;" ng-click="getmodal('account.fujian','ctitle','id='+item.id)" class="js_edit js_tooltip js_popover" title="编辑名称">
                        <span class="msg_card_opr_item_inner">
                          <i class="fa fa-pencil ico-add"></i></span>
                        <span class="vm_box"></span>
                      </a>
                    </li>
                    <li class="grid_item size-1of3 msg_card_opr_item">
                      <a class="js_move js_tooltip js_popover" href="javascript:;" ng-click="getmodal('account.fujian','cgroup','id='+item.id)" title="移动分组">
                        <span class="msg_card_opr_item_inner">
                          <i class="fa fa-exchange ico-add"></i></span>
                        <span class="vm_box"></span>
                      </a>
                    </li>
                    <li class="grid_item size-1of3 no_extra msg_card_opr_item">
                      <a class="js_del js_tooltip" ng-click="post({},'del','id='+item.id,'','真的要删除吗？')" title="删除">
                        <span class="msg_card_opr_item_inner">
                          <i class="fa fa-trash-o ico-add"></i></span>
                        <span class="vm_box"></span>
                      </a>
                    </li>
                  </ul>
                </div>
              </li>
         
            </ul>
          </div>
		  <!-- 分页导航 -->
          <div ng-include="sys_html('common/page',true)"></div>
        </div>
      </div>
    </div>
    <div class="inner_side">
      <div class="bd">
        <div class="group_list">
          <div class="inner_menu_box" id="js_group">
            <dl class="inner_menu">
              <dd class="inner_menu_item  js_groupitem" ng-class="{'selected':group.id==pagedata.params.group_id}" ng-repeat="group in pagedata.groups">
                <a href="javascript:;" class="inner_menu_link" ng-click="access('image','group_id='+group.id)" title="{{group.title}}">
                  <strong>{{group.title}}</strong>
                  <em class="num">({{group.num}})</em>
				</a>
              </dd>
              
            </dl>
          </div>
          <div class="inner_menu_item">
            <a href="javascript:;" ng-click="getmodal('account.fujian','add_group')" class="inner_menu_link js_popover" id="js_creategroup">
              <i class="fa fa-plus"></i> 新建分组</a>
			</div>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
<div ng-if="pagedata.op=='audio'">
<div class="clearfix jinyun-margin-bottom">
	<div class="form-inline  pull-left">
			<div class="input-group form-group" style="width: 400px;">
				<input type="text" name="keyword" ng-model="pagedata.params.title" class="form-control" placeholder="搜索关键字"/>
				<span class="input-group-btn"><button id="submit" ng-click="pagedata.params.page=1;access(pagedata.op,made_query(pagedata.params))" class="btn btn-default"><i class="fa fa-search"></i></button></span>
			</div>
	</div>
</div>
<div class="media_list group voice_media">
  <div class="msg_card audio_msg_card media_card mini no_opr_border" ng-repeat="item in pagedata.list">
    <div class="msg_card_inner">
      <div class="msg_card_bd">
        <div  class="audio_msg_wrp card file_wrp cover">
          <div class="audio_msg">
            <div class="icon_audio_wrp l">
              <span class="icon_audio_msg"> <img src="/core/resource/images/ico-audio.png" width="60px"></img></span>
            </div>
            <div class="audio_content">
              <div class="audio_title">{{item.title}}</div>
              <div class="audio_date">创建于:{{item.createtime}}</div></div>
          </div>
        </div>
      </div>
      <div class="msg_card_ft">
        <ul class="grid_line msg_card_opr_list">
          <li class="grid_item size-1of3 msg_card_opr_item">
            <a class="js_edit js_tooltip" id="{{item.id}}" href="javascript:;"  title="播放">
              <span class="msg_card_opr_item_inner">
                <i onclick="$(this).toggleClass('fa-play fa-stop');play_audio($(this).next())" class="fa fa-play"></i>
				<audio style="display:none;" src="{{tomedia(item.attachment)}}" loop="loop"></audio>
				</span>
              <span class="vm_box"></span>
            </a>
          </li>
          <li class="grid_item size-1of3 no_extra msg_card_opr_item">
            <a class="js_del js_tooltip" href="javascript:;" ng-click="post({},'del','id='+item.id,'','真的要删除吗？')" title="删除">
              <span class="msg_card_opr_item_inner">
                <i class="fa fa-trash-o ico-add"></i></span>
              <span class="vm_box"></span>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</div>
	<!-- 分页导航 -->
	<div ng-include="sys_html('common/page',true)"></div>
</div>
	<div class="modal fade" id="image-info"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:800px">
			<div class="modal-content form-horizontal form" >
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4>编辑附件信息</h4>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 left-label"> 附件标题</label>
							<div class="col-sm-9 col-xs-12">
								<input type="text" name="title" value="" class="form-control" ng-model="pagedata.item.title">
								<span class="help-block">模块的名称, 显示在用户的模块列表中. 不要超过10个字符</span>
							</div>
						</div>
					</div>
					
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<input type="submit" class="btn btn-primary" ng-click="post(pagedata.item,'ctitle','id='+pagedata.item.id)" data-dismiss="modal" name="submit" value="保存">
					</div>
			</div>
		</div>
	</div>
<script>

window.scope.ctitle=function(item){
	window.scope.pagedata.item=item;
	$('#image-info').modal();
}

</script>

<div ng-if="pagedata.op=='video'">
<div class="clearfix jinyun-margin-bottom">
	<div class="form-inline  pull-left">
			<div class="input-group form-group" style="width: 400px;">
				<input type="text" name="keyword" ng-model="pagedata.params.title" class="form-control" placeholder="搜索关键字"/>
				<span class="input-group-btn"><button id="submit" ng-click="pagedata.params.page=1;access(pagedata.op,made_query(pagedata.params))" class="btn btn-default"><i class="fa fa-search"></i></button></span>
			</div>
	</div>
</div>
<div class="media_list group voice_media">
  <div class="msg_card audio_msg_card media_card mini no_opr_border" ng-repeat="item in pagedata.list">
    <div class="msg_card_inner">
      <div class="msg_card_bd">
        <div  class="audio_msg_wrp card file_wrp cover">
          <div class="audio_msg">
            <div class="icon_audio_wrp l">
              <span class="icon_audio_msg">
			  <video src="{{tomedia(item.attachment)}}" width="300" height="200" controls="controls"></video>
			  </span>
            </div>
          </div>
        </div>
      </div>
      <div class="msg_card_ft">
        <ul class="grid_line msg_card_opr_list">
          <li class="grid_item size-1of3 no_extra msg_card_opr_item">
            <span class="msg_card_opr_item_inner">{{item.title}}</span>
          </li>
		  <li class="grid_item size-1of3 no_extra msg_card_opr_item">
            <a class="js_del js_tooltip" href="javascript:;" ng-click="post({},'del','id='+item.id,'','真的要删除吗？')" title="删除">
              <span class="msg_card_opr_item_inner">
                <i class="fa fa-trash-o ico-add"></i></span>
              <span class="vm_box"></span>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</div>
	<!-- 分页导航 -->
	<div ng-include="sys_html('common/page',true)"></div>
</div>